

package com.kimo.shop.dao;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kimo.shop.bean.model.User;
import com.kimo.shop.bean.param.CustomerReqParam;
import com.kimo.shop.bean.param.UserManagerParam;
import com.kimo.shop.bean.param.UserManagerReqParam;
import com.kimo.shop.common.util.PageAdapter;
import com.kimo.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface UserMapper extends BaseMapper<User> {

    User getUserByBizUserId(@Param("appId") Integer appId, @Param("bizUserId") String bizUserId);

    void setUserLevelBylevelId(@Param("level") Integer level, @Param("levelType") Integer levelType);

    void setMaxUserLevelBylevelId(@Param("level") Integer level, @Param("minNeedGrowth") Integer minNeedGrowth, @Param("maxNeedGrowth") Integer maxNeedGrowth, @Param("levelType") Integer levelType);

    List<User> selectMemberByEndTime(@Param("endOfDay") DateTime endOfDay);

    IPage<User> getUserPage(PageParam<User> page, @Param("user") User user);

    List<User> getUserListByUserNumbers(@Param("userSet") Set<String> userSet);

    User getUserDetail(@Param("userId") String userId);

    Integer countUserByParam(@Param("param") CustomerReqParam param);


    Integer countMemberByParam(@Param("param") CustomerReqParam param);

    Integer countUserNums(@Param("param") CustomerReqParam param);

    List<UserManagerParam> getUserPageByParam(@Param("adapter") PageAdapter adapter, @Param("param") UserManagerReqParam param);

    Integer countGetUserPageByParam(@Param("adapter") PageAdapter adapter, @Param("param") UserManagerReqParam param);

    UserManagerParam getuserInfo(@Param("userId") String userId);

    List<User> listByUserPhones(@Param("phones") List<String> phones);

    List<User> listByUserMails(@Param("mails") List<String> mails);

    List<String> listUserName(@Param("nickNames") Set<String> nickNames);

}
